package com.fang.dubbo.provider.api.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.fang.dubbo.api.TestApi;
import com.fang.dubbo.model.TestReqModel;
import com.fang.dubbo.model.TestResModel;
import lombok.extern.slf4j.Slf4j;

/**
 * @author fanglingxiao
 * @version 1.0
 * @description duboo会启动spring加载其ServiceBean
 * 在xml配置dubbo接口时
 * <bean id = "com.fang.dubbo.provider.api.TestApi" class="com.alibaba.dubbo.config.ServiceBean">
 *      <property name="interface" value="com.fang.dubbo.provider.api.TestApi"/>
 *      <property name="ref" ref="TestApi"/>
 * </bean>
 * @date 2022/4/25 10:41 上午
 **/
@Slf4j
@Service
public class TestApiImpl implements TestApi {
    /**
     * @param reqModel
     * @author fanglingxiao
     * @createDateTime 2022/4/25 10:46 上午
     */
    @Override
    public TestResModel test(TestReqModel reqModel) {
        log.info("执行....req={}", reqModel);
        return new TestResModel(reqModel.getRequestId());
    }
}
